public class Test10 {
    public static void main(String[] args) {
        String abc = "342567891";
        char[] charArray = abc.toCharArray();
        //冒泡排序
        for(int i=0;i<abc.length();i++){
            for(int j=0;j<abc.length()-i-1;j++){
                if(charArray[j]<charArray[j+1]){
                    char temp=charArray[j];
                    charArray[j]=charArray[j+1];
                    charArray[j+1]=temp;
                }
            }
        }
        for (int i = 0; i < charArray.length; i++) {
            System.out.print(charArray[i]+" ");
        }
    }
}
